<?php

namespace app\controllers;

use app\models\Article;
use yii\base\Security;

class SiteController extends \yii\web\Controller
{
    public function actionIndex()
    {
        $article = Article::find()->all();

        return $this->render('index', ['a' => $article]);
    }

    public function actionMultiple()
    {
        $security = new Security();
        $randomString = $security->generateRandomString();
        $randomKey = $security->generateRandomKey();
        return $this->render('multiple', [
            'randomString' => $randomString,
            'randomKey' => $randomKey,
        ]);
    }
}
